package com.designpattern.demo.design2;

/**
 * 打折收费子类
 * Created by lingchen on 2019/11/26. 21:03
 * mail:lingchen52@foxmail.com
 */
public class CashRabate extends CashSuper {

    private double moneyRebate = 1d;

    public CashRabate(String strRebate) {
        this.moneyRebate = Double.valueOf(strRebate);
    }

    @Override
    public double acceptCash(double money) {
        return money * moneyRebate;
    }
}
